//
//  FSNewSendDetailCell.m
//  Trade
//
//  Created by 刘沿 on 16/4/13.
//  Copyright © 2016年 刘沿. All rights reserved.
//

#import "FSNewSendDetailCell.h"

@implementation FSNewSendDetailCell

+(instancetype)cellWihtTableView:(UITableView*)tableView{
    NSString * cellIdentifier = @"cellIdentifier";
    FSNewSendDetailCell * cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
    if (cell == nil) {
        cell = [[[NSBundle mainBundle] loadNibNamed:@"FSNewSendDetailCell" owner:nil options:nil] lastObject];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    
    return cell;
    
}

-(void)setIndexPath:(NSIndexPath *)indexPath{
    _indexPath = indexPath;
    if (indexPath.section == 0) {
        switch (indexPath.row) {
            case 0:
                self.titleLabel.text = @"拟稿处室及拟稿人:";
                self.desLabel.text =self.detailModel.name;
                break;
            case 1:
                self.titleLabel.text = @"发文字号:";
                self.desLabel.text =self.detailModel.fileId;
                break;
            case 2:
                self.titleLabel.text = @"签发日期:";
                self.desLabel.text =self.detailModel.signDate;
                break;
            case 3:
                self.titleLabel.text = @"签发人:";
                if ([self.detailModel.signer isEqualToString:@"null"]) {
                    self.desLabel.text = @"";
                }else{
                    self.desLabel.text = self.detailModel.signer;
                }
                
                break;
            case 4:
                self.titleLabel.text = @"主送机关:";
                if ([self.detailModel.mainSendOrgan isEqualToString:@"null"]){
                    self.desLabel.text = @"";
                }else{
                    self.desLabel.text = self.detailModel.mainSendOrgan;
                }
                
                break;
            case 5:
                self.titleLabel.text = @"抄送机关:";
                if ([self.detailModel.SendOrgan isEqualToString:@"null"]){
                    self.desLabel.text = @"";
                }else{
                    self.desLabel.text = self.detailModel.SendOrgan;
                }
                break;
            case 6:
                self.titleLabel.text = @"主题词:";
                self.desLabel.text = self.detailModel.theme;
                break;
            case 7:
                self.titleLabel.text = @"标题:";
                
                self.desLabel.text = self.detailModel.title;
                break;
            default:
                self.titleLabel.text = @"";
                self.desLabel.text =@"";
                break;
        }
        
    }else{
        self.titleLabel.text = @"";
        self.desLabel.text =@"";
    }
    
    
}




@end
